<%-- 
	作成者：马龙升
	日期：2010-5-25
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:useBean id="pagi" class="com.ccxe.manage.service.page.bean.PageBean" scope="request"></jsp:useBean>
<%
	String pagiServletPath = pagi.getServletUrl();
	String pagiNowPage = pagi.getNowPage() + "";
	String pagiShowData = pagi.getShowData() + "" ;
	int sortType = pagi.getSortType();
%>
<script type="text/javascript">

	function toSelectPage(pageListObj){
		//alert(destPageUri);
		var selectIndexObj = pageListObj.options[pageListObj.selectedIndex];
		//alert(selectIndexObj.value);
		formSubmit( selectIndexObj.value + "&actionSign=fromLink");
	}
	
</script>
    <div class="paging">
		<div class="page">
			<% 
				String pagiActionPath = pagiServletPath + "&sortType=" + sortType + "&nowPage=";
				String pagiActionPath1 = pagiActionPath + "1&showData=" + pagiShowData + "&actionSign=fromLink";
				int iPage = Integer.parseInt(pagiNowPage);
				int iTemp = iPage;
				if("1".equals(pagiNowPage) || "1".compareTo(pagiNowPage) > 0)
				{
			%>
					<a class="none">&#124;&#65308;最前页</a>
					<a class="none">&lt;&lt;上一页</a>
			<%
				}else
				{
			%>
					<a href="javascript:void(0);" onclick="formSubmit('<%=pagiActionPath1 %>');">&lt;&lt;最前页</a>
					<%
						iTemp--;
						pagiActionPath1 = pagiActionPath + iTemp + "&showData=" + pagiShowData + "&actionSign=fromLink";
					%>
					<a href="javascript:void(0)" onclick="formSubmit('<%=pagiActionPath1 %>')">&lt;&lt;上一页</a>			
			<%
				}
			%>
			<%
				iTemp = iPage;
				if(iPage == pagi.getTotalPage() || pagi.getTotalPage() == 0)
				{
			%>
					<a class="none">下一页 &#62;&#62;</a>
					<a class="none">最末页 &#62;&#124;</a>
			<%
				}else
				{
					iTemp++;
					pagiActionPath1 = pagiActionPath + iTemp + "&showData=" + pagiShowData + "&actionSign=fromLink";
			%>
					<a href="javascript:void(0)" onclick="formSubmit('<%=pagiActionPath1 %>')">下一页 &gt;&gt;</a>
					<%
						pagiActionPath1 = pagiActionPath + pagi.getTotalPage() + "&showData=" + pagiShowData + "&actionSign=fromLink";
					%>
					<a href="javascript:void(0)" onclick="formSubmit('<%=pagiActionPath1 %>')" >最末页 &gt;&gt;</a>
			<%
				}
			%>
		</div>
		共<span><%=pagi.getTotalData() %></span>条数据    共<span><%=pagi.getTotalPage() %></span>页 &nbsp;
		跳转到第	<select name="pagelink" onchange="javascript:toSelectPage(this);" style="width:50px;" ">
			<%
				for(int i =0;i<= pagi.getTotalPage();i++)
				{
					pagiActionPath1 = pagiServletPath + "&showData=" + pagiShowData + "&nowPage=" + i;
					if(i == pagi.getNowPage()){
					%>
						<option value="<%=pagiActionPath1 %>" selected><%=i %></option>
					<%
					}else{
					%>
						<option value="<%=pagiActionPath1 %>"><%=i %></option>
					<%
					}
				}
			%>
		</select>页
	</div> 
	<script type="text/javascript" >
		function formSubmit(url){
			document.forms[0].action = url ;
			document.forms[0].submit();
		}
	</script>